<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>shark::KernelSGDTrainer&lt; InputType, CacheType &gt; Class Template Reference</title>
<script type="text/javaScript" src="search/search.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js"></script>
<script src="../../mlstyle.js"></script>
<link href="../css/besser.css" rel="stylesheet" type="text/css"/>
</head>
<!-- pretty cool: each body gets an id tag which is the basename of the web page  -->
<!--              and allows for page-specific CSS. this is client-side scripted, -->
<!--              so the id will not yet show up in the served source code -->
<script type="text/javascript">
    jQuery(document).ready(function () {
        var url = jQuery(location).attr('href');
        var pname = url.substr(url.lastIndexOf("/")+1, url.lastIndexOf(".")-url.lastIndexOf("/")-1);
        jQuery('#this_url').html('<strong>' + pname + '</strong>');
        jQuery('body').attr('id', pname);
    });
</script>
<body>
    <div id="shark_old">
        <div id="wrap">
            <div id="header">
                <div id="site-name"><a href="../../sphinx_pages/build/html/index.html">Shark machine learning library</a></div>
                <ul id="nav">
                    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/installation.html">Installation</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/tutorials/tutorials.html">Tutorials</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/benchmark.html">Benchmarks</a>
                    </li>
                    <li class="active">
                        <a href="classes.html">Documentation</a>
                        <ul>
                            <li class="first"></li>
                            <li><a href="../../sphinx_pages/build/html/rest_sources/quickref/quickref.html">Quick references</a></li>
                            <li><a href="classes.html">Class list</a></li>
                            <li class="last"><a href="group__shark__globals.html">Global functions</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>
<div id="doxywrapper">
<!--
    <div id="global_doxytitle">Doxygen<br>Documentation:</div>
-->
    <div id="navrow_wrapper">
<!-- Generated by Doxygen 1.9.8 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceshark.html">shark</a></li><li class="navelem"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">KernelSGDTrainer</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="classshark_1_1_kernel_s_g_d_trainer-members.html">List of all members</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle"><div class="title">shark::KernelSGDTrainer&lt; InputType, CacheType &gt; Class Template Reference<div class="ingroups"><a class="el" href="group__supervised__trainer.html">Supervised Trainers</a></div></div></div>
</div><!--header-->
<div class="contents">

<p>Generic stochastic gradient descent training for kernel-based models.  
 <a href="classshark_1_1_kernel_s_g_d_trainer.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_kernel_s_g_d_trainer_8h_source.html">shark/Algorithms/Trainers/KernelSGDTrainer.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for shark::KernelSGDTrainer&lt; InputType, CacheType &gt;:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="classshark_1_1_kernel_s_g_d_trainer__inherit__graph.png" border="0" usemap="#ashark_1_1_kernel_s_g_d_trainer_3_01_input_type_00_01_cache_type_01_4_inherit__map" alt="Inheritance graph"/></div>
<map name="ashark_1_1_kernel_s_g_d_trainer_3_01_input_type_00_01_cache_type_01_4_inherit__map" id="ashark_1_1_kernel_s_g_d_trainer_3_01_input_type_00_01_cache_type_01_4_inherit__map">
<area shape="rect" title="Generic stochastic gradient descent training for kernel&#45;based models." alt="" coords="272,39,448,79"/>
<area shape="rect" href="classshark_1_1_abstract_trainer.html" title=" " alt="" coords="5,5,224,46"/>
<area shape="poly" title=" " alt="" coords="239,40,272,44,271,50,239,45"/>
<area shape="rect" href="classshark_1_1_i_parameterizable.html" title="Top level interface for everything that holds parameters." alt="" coords="35,71,194,111"/>
<area shape="poly" title=" " alt="" coords="209,76,271,68,272,73,210,81"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a606dc86cf240c1fe43791df0ce24998e" id="r_a606dc86cf240c1fe43791df0ce24998e"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_abstract_kernel_function.html">AbstractKernelFunction</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a606dc86cf240c1fe43791df0ce24998e">KernelType</a></td></tr>
<tr class="separator:a606dc86cf240c1fe43791df0ce24998e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5488cda990c715d893dfba057fa88b40" id="r_a5488cda990c715d893dfba057fa88b40"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="structshark_1_1_kernel_classifier.html">KernelClassifier</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a5488cda990c715d893dfba057fa88b40">ClassifierType</a></td></tr>
<tr class="separator:a5488cda990c715d893dfba057fa88b40"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a438d0be0a607dac285103e8a264705ae" id="r_a438d0be0a607dac285103e8a264705ae"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_kernel_expansion.html">KernelExpansion</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a438d0be0a607dac285103e8a264705ae">ModelType</a></td></tr>
<tr class="separator:a438d0be0a607dac285103e8a264705ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afcfe228a0df389b8f56733d0e9ec90dc" id="r_afcfe228a0df389b8f56733d0e9ec90dc"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_abstract_loss.html">AbstractLoss</a>&lt; unsigned int, RealVector &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#afcfe228a0df389b8f56733d0e9ec90dc">LossType</a></td></tr>
<tr class="separator:afcfe228a0df389b8f56733d0e9ec90dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a74cd4fda9509abea240aa92b0475cd19" id="r_a74cd4fda9509abea240aa92b0475cd19"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="structshark_1_1_const_proxy_reference.html">ConstProxyReference</a>&lt; typenameBatch&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> &gt;::typeconst &gt;::type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a74cd4fda9509abea240aa92b0475cd19">ConstBatchInputReference</a></td></tr>
<tr class="separator:a74cd4fda9509abea240aa92b0475cd19"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6097a25678eae9b9152d2b906157dea8" id="r_a6097a25678eae9b9152d2b906157dea8"><td class="memItemLeft" align="right" valign="top">typedef CacheType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a6097a25678eae9b9152d2b906157dea8">QpFloatType</a></td></tr>
<tr class="separator:a6097a25678eae9b9152d2b906157dea8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a65ceba570e60a98afd4669f648332674" id="r_a65ceba570e60a98afd4669f648332674"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_kernel_matrix.html">KernelMatrix</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a6097a25678eae9b9152d2b906157dea8">QpFloatType</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a65ceba570e60a98afd4669f648332674">KernelMatrixType</a></td></tr>
<tr class="separator:a65ceba570e60a98afd4669f648332674"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adf916f6e4f7e0593ba14ef630f9a449d" id="r_adf916f6e4f7e0593ba14ef630f9a449d"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_partly_precomputed_matrix.html">PartlyPrecomputedMatrix</a>&lt; <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a65ceba570e60a98afd4669f648332674">KernelMatrixType</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#adf916f6e4f7e0593ba14ef630f9a449d">PartlyPrecomputedMatrixType</a></td></tr>
<tr class="separator:adf916f6e4f7e0593ba14ef630f9a449d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_types_classshark_1_1_abstract_trainer"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classshark_1_1_abstract_trainer')"><img src="closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="classshark_1_1_abstract_trainer.html">shark::AbstractTrainer&lt; KernelClassifier&lt; InputType &gt; &gt;</a></td></tr>
<tr class="memitem:a0d5c9d35b614d6a33e4e8bfeaf1e9298 inherit pub_types_classshark_1_1_abstract_trainer" id="r_a0d5c9d35b614d6a33e4e8bfeaf1e9298"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="structshark_1_1_kernel_classifier.html">KernelClassifier</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_trainer.html#a0d5c9d35b614d6a33e4e8bfeaf1e9298">ModelType</a></td></tr>
<tr class="separator:a0d5c9d35b614d6a33e4e8bfeaf1e9298 inherit pub_types_classshark_1_1_abstract_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0cfa7cdd27b8bb162e64188095f8fa71 inherit pub_types_classshark_1_1_abstract_trainer" id="r_a0cfa7cdd27b8bb162e64188095f8fa71"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_abstract_model.html#a714e85d7a6cd2b68898cb5dbb25c37d4">ModelType::InputType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a></td></tr>
<tr class="separator:a0cfa7cdd27b8bb162e64188095f8fa71 inherit pub_types_classshark_1_1_abstract_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4e344106831fb8227c2120681588ea9 inherit pub_types_classshark_1_1_abstract_trainer" id="r_aa4e344106831fb8227c2120681588ea9"><td class="memItemLeft" align="right" valign="top">typedef typename Model::OutputType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_trainer.html#aa4e344106831fb8227c2120681588ea9">LabelType</a></td></tr>
<tr class="separator:aa4e344106831fb8227c2120681588ea9 inherit pub_types_classshark_1_1_abstract_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4730fe9d59622d35d95cd4233f8d7af inherit pub_types_classshark_1_1_abstract_trainer" id="r_aa4730fe9d59622d35d95cd4233f8d7af"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, <a class="el" href="classshark_1_1_abstract_trainer.html#aa4e344106831fb8227c2120681588ea9">LabelType</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_trainer.html#aa4730fe9d59622d35d95cd4233f8d7af">DatasetType</a></td></tr>
<tr class="separator:aa4730fe9d59622d35d95cd4233f8d7af inherit pub_types_classshark_1_1_abstract_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_types_classshark_1_1_i_parameterizable"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classshark_1_1_i_parameterizable')"><img src="closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="classshark_1_1_i_parameterizable.html">shark::IParameterizable&lt; VectorType &gt;</a></td></tr>
<tr class="memitem:a2ad5e2e60b2b352988b41f46024d790b inherit pub_types_classshark_1_1_i_parameterizable" id="r_a2ad5e2e60b2b352988b41f46024d790b"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="_c_svm_linear_8cpp.html#ab106d665148183a2dc94dcf8716c9203">VectorType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_parameterizable.html#a2ad5e2e60b2b352988b41f46024d790b">ParameterVectorType</a></td></tr>
<tr class="separator:a2ad5e2e60b2b352988b41f46024d790b inherit pub_types_classshark_1_1_i_parameterizable"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:adc23910b5eddd9a8190fe796ff9291f4" id="r_adc23910b5eddd9a8190fe796ff9291f4"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#adc23910b5eddd9a8190fe796ff9291f4">KernelSGDTrainer</a> (<a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a606dc86cf240c1fe43791df0ce24998e">KernelType</a> *<a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#ade8ab81af9b2934ae72b442b8c98e9d5">kernel</a>, const <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#afcfe228a0df389b8f56733d0e9ec90dc">LossType</a> *loss, double <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a442f481e2e8f97156994ed478ec5d91f">C</a>, bool offset, bool unconstrained=false, size_t <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#ac0183963a7f82e77ba7333666e05f895">cacheSize</a>=0x4000000)</td></tr>
<tr class="memdesc:adc23910b5eddd9a8190fe796ff9291f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <br /></td></tr>
<tr class="separator:adc23910b5eddd9a8190fe796ff9291f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac0183963a7f82e77ba7333666e05f895" id="r_ac0183963a7f82e77ba7333666e05f895"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#ac0183963a7f82e77ba7333666e05f895">cacheSize</a> () const</td></tr>
<tr class="memdesc:ac0183963a7f82e77ba7333666e05f895"><td class="mdescLeft">&#160;</td><td class="mdescRight">return current cachesize  <br /></td></tr>
<tr class="separator:ac0183963a7f82e77ba7333666e05f895"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab17a0f3738e21dc766e74cfd6e8e05ff" id="r_ab17a0f3738e21dc766e74cfd6e8e05ff"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#ab17a0f3738e21dc766e74cfd6e8e05ff">setCacheSize</a> (std::size_t size)</td></tr>
<tr class="separator:ab17a0f3738e21dc766e74cfd6e8e05ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5adb31bcd362569c1e123a6325329be9" id="r_a5adb31bcd362569c1e123a6325329be9"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a5adb31bcd362569c1e123a6325329be9">name</a> () const</td></tr>
<tr class="memdesc:a5adb31bcd362569c1e123a6325329be9"><td class="mdescLeft">&#160;</td><td class="mdescRight">From <a class="el" href="classshark_1_1_i_nameable.html" title="This class is an interface for all objects which can have a name.">INameable</a>: return the class name.  <br /></td></tr>
<tr class="separator:a5adb31bcd362569c1e123a6325329be9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31c7513f29d280ad3165d18100962391" id="r_a31c7513f29d280ad3165d18100962391"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a31c7513f29d280ad3165d18100962391">train</a> (<a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a5488cda990c715d893dfba057fa88b40">ClassifierType</a> &amp;classifier, const <a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, unsigned int &gt; &amp;dataset)</td></tr>
<tr class="separator:a31c7513f29d280ad3165d18100962391"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae7b9d884f5389bad153a8d9780cd494f" id="r_ae7b9d884f5389bad153a8d9780cd494f"><td class="memItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#ae7b9d884f5389bad153a8d9780cd494f">epochs</a> () const</td></tr>
<tr class="separator:ae7b9d884f5389bad153a8d9780cd494f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc7519d465974fcbb2c059debcedcc8e" id="r_acc7519d465974fcbb2c059debcedcc8e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#acc7519d465974fcbb2c059debcedcc8e">setEpochs</a> (std::size_t value)</td></tr>
<tr class="separator:acc7519d465974fcbb2c059debcedcc8e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade8ab81af9b2934ae72b442b8c98e9d5" id="r_ade8ab81af9b2934ae72b442b8c98e9d5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a606dc86cf240c1fe43791df0ce24998e">KernelType</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#ade8ab81af9b2934ae72b442b8c98e9d5">kernel</a> ()</td></tr>
<tr class="memdesc:ade8ab81af9b2934ae72b442b8c98e9d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">get the kernel function  <br /></td></tr>
<tr class="separator:ade8ab81af9b2934ae72b442b8c98e9d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae8547043f53fd4f9a0fabbc0b30633e6" id="r_ae8547043f53fd4f9a0fabbc0b30633e6"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a606dc86cf240c1fe43791df0ce24998e">KernelType</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#ae8547043f53fd4f9a0fabbc0b30633e6">kernel</a> () const</td></tr>
<tr class="memdesc:ae8547043f53fd4f9a0fabbc0b30633e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">get the kernel function  <br /></td></tr>
<tr class="separator:ae8547043f53fd4f9a0fabbc0b30633e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac9b2d2d0ca5dc5bdf44194d1cbffe607" id="r_ac9b2d2d0ca5dc5bdf44194d1cbffe607"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#ac9b2d2d0ca5dc5bdf44194d1cbffe607">setKernel</a> (<a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a606dc86cf240c1fe43791df0ce24998e">KernelType</a> *<a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#ade8ab81af9b2934ae72b442b8c98e9d5">kernel</a>)</td></tr>
<tr class="memdesc:ac9b2d2d0ca5dc5bdf44194d1cbffe607"><td class="mdescLeft">&#160;</td><td class="mdescRight">set the kernel function  <br /></td></tr>
<tr class="separator:ac9b2d2d0ca5dc5bdf44194d1cbffe607"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5f52c070bb985c7bf1f7063c7b4c695a" id="r_a5f52c070bb985c7bf1f7063c7b4c695a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a5f52c070bb985c7bf1f7063c7b4c695a">isUnconstrained</a> () const</td></tr>
<tr class="separator:a5f52c070bb985c7bf1f7063c7b4c695a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a442f481e2e8f97156994ed478ec5d91f" id="r_a442f481e2e8f97156994ed478ec5d91f"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a442f481e2e8f97156994ed478ec5d91f">C</a> () const</td></tr>
<tr class="memdesc:a442f481e2e8f97156994ed478ec5d91f"><td class="mdescLeft">&#160;</td><td class="mdescRight">return the value of the regularization parameter  <br /></td></tr>
<tr class="separator:a442f481e2e8f97156994ed478ec5d91f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b5805e9aedbf6a043c19aa802255837" id="r_a7b5805e9aedbf6a043c19aa802255837"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a7b5805e9aedbf6a043c19aa802255837">setC</a> (double value)</td></tr>
<tr class="memdesc:a7b5805e9aedbf6a043c19aa802255837"><td class="mdescLeft">&#160;</td><td class="mdescRight">set the value of the regularization parameter (must be positive)  <br /></td></tr>
<tr class="separator:a7b5805e9aedbf6a043c19aa802255837"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09fa50917fb4f3deda0e6b0c29977d07" id="r_a09fa50917fb4f3deda0e6b0c29977d07"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a09fa50917fb4f3deda0e6b0c29977d07">trainOffset</a> () const</td></tr>
<tr class="memdesc:a09fa50917fb4f3deda0e6b0c29977d07"><td class="mdescLeft">&#160;</td><td class="mdescRight">check whether the model to be trained should include an offset term  <br /></td></tr>
<tr class="separator:a09fa50917fb4f3deda0e6b0c29977d07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9e4920082ba0a7a88a9589d82024326" id="r_ab9e4920082ba0a7a88a9589d82024326"><td class="memItemLeft" align="right" valign="top">RealVector&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#ab9e4920082ba0a7a88a9589d82024326">parameterVector</a> () const</td></tr>
<tr class="memdesc:ab9e4920082ba0a7a88a9589d82024326"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the vector of hyper-parameters.  <br /></td></tr>
<tr class="separator:ab9e4920082ba0a7a88a9589d82024326"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a60e89b698e5ff7d10ad7c613e369f0ac" id="r_a60e89b698e5ff7d10ad7c613e369f0ac"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a60e89b698e5ff7d10ad7c613e369f0ac">setParameterVector</a> (RealVector const &amp;newParameters)</td></tr>
<tr class="memdesc:a60e89b698e5ff7d10ad7c613e369f0ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the vector of hyper-parameters.  <br /></td></tr>
<tr class="separator:a60e89b698e5ff7d10ad7c613e369f0ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9acfcaf7fee65d405706e35c16d43bb0" id="r_a9acfcaf7fee65d405706e35c16d43bb0"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a9acfcaf7fee65d405706e35c16d43bb0">numberOfParameters</a> () const</td></tr>
<tr class="memdesc:a9acfcaf7fee65d405706e35c16d43bb0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of hyper-parameters.  <br /></td></tr>
<tr class="separator:a9acfcaf7fee65d405706e35c16d43bb0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classshark_1_1_abstract_trainer"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classshark_1_1_abstract_trainer')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classshark_1_1_abstract_trainer.html">shark::AbstractTrainer&lt; KernelClassifier&lt; InputType &gt; &gt;</a></td></tr>
<tr class="memitem:a71d3fd2567473d746ecb733d7fa28c7e inherit pub_methods_classshark_1_1_abstract_trainer" id="r_a71d3fd2567473d746ecb733d7fa28c7e"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_trainer.html#a71d3fd2567473d746ecb733d7fa28c7e">train</a> (<a class="el" href="classshark_1_1_abstract_trainer.html#a0d5c9d35b614d6a33e4e8bfeaf1e9298">ModelType</a> &amp;model, <a class="el" href="classshark_1_1_abstract_trainer.html#aa4730fe9d59622d35d95cd4233f8d7af">DatasetType</a> const &amp;dataset)=0</td></tr>
<tr class="memdesc:a71d3fd2567473d746ecb733d7fa28c7e inherit pub_methods_classshark_1_1_abstract_trainer"><td class="mdescLeft">&#160;</td><td class="mdescRight">Core of the Trainer interface.  <br /></td></tr>
<tr class="separator:a71d3fd2567473d746ecb733d7fa28c7e inherit pub_methods_classshark_1_1_abstract_trainer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classshark_1_1_i_nameable"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classshark_1_1_i_nameable')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classshark_1_1_i_nameable.html">shark::INameable</a></td></tr>
<tr class="memitem:a877dbdfc6b58ea836495143cea44a98c inherit pub_methods_classshark_1_1_i_nameable" id="r_a877dbdfc6b58ea836495143cea44a98c"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_nameable.html#a877dbdfc6b58ea836495143cea44a98c">~INameable</a> ()</td></tr>
<tr class="separator:a877dbdfc6b58ea836495143cea44a98c inherit pub_methods_classshark_1_1_i_nameable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classshark_1_1_i_serializable"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classshark_1_1_i_serializable')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classshark_1_1_i_serializable.html">shark::ISerializable</a></td></tr>
<tr class="memitem:a7baa9ce108d7278822297ce15882782a inherit pub_methods_classshark_1_1_i_serializable" id="r_a7baa9ce108d7278822297ce15882782a"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#a7baa9ce108d7278822297ce15882782a">~ISerializable</a> ()</td></tr>
<tr class="memdesc:a7baa9ce108d7278822297ce15882782a inherit pub_methods_classshark_1_1_i_serializable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtual d'tor.  <br /></td></tr>
<tr class="separator:a7baa9ce108d7278822297ce15882782a inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4ad9a7c274deff642f91e98417fbc63 inherit pub_methods_classshark_1_1_i_serializable" id="r_ad4ad9a7c274deff642f91e98417fbc63"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#ad4ad9a7c274deff642f91e98417fbc63">read</a> (<a class="el" href="namespaceshark.html#ada68729491840669e47c8ad42282424f">InArchive</a> &amp;archive)</td></tr>
<tr class="memdesc:ad4ad9a7c274deff642f91e98417fbc63 inherit pub_methods_classshark_1_1_i_serializable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read the component from the supplied archive.  <br /></td></tr>
<tr class="separator:ad4ad9a7c274deff642f91e98417fbc63 inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9bddedd42933c922e323b73131f62f12 inherit pub_methods_classshark_1_1_i_serializable" id="r_a9bddedd42933c922e323b73131f62f12"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#a9bddedd42933c922e323b73131f62f12">write</a> (<a class="el" href="namespaceshark.html#af4f8eb8e9618f5236b71bbcb12b8a524">OutArchive</a> &amp;archive) const</td></tr>
<tr class="memdesc:a9bddedd42933c922e323b73131f62f12 inherit pub_methods_classshark_1_1_i_serializable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write the component to the supplied archive.  <br /></td></tr>
<tr class="separator:a9bddedd42933c922e323b73131f62f12 inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abdda0c5b8e065b8afbac2cba8f58e841 inherit pub_methods_classshark_1_1_i_serializable" id="r_abdda0c5b8e065b8afbac2cba8f58e841"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#abdda0c5b8e065b8afbac2cba8f58e841">load</a> (<a class="el" href="namespaceshark.html#ada68729491840669e47c8ad42282424f">InArchive</a> &amp;archive, unsigned int version)</td></tr>
<tr class="memdesc:abdda0c5b8e065b8afbac2cba8f58e841 inherit pub_methods_classshark_1_1_i_serializable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Versioned loading of components, calls read(...).  <br /></td></tr>
<tr class="separator:abdda0c5b8e065b8afbac2cba8f58e841 inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5bf66fa8db15cc529bec98976a2f5255 inherit pub_methods_classshark_1_1_i_serializable" id="r_a5bf66fa8db15cc529bec98976a2f5255"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#a5bf66fa8db15cc529bec98976a2f5255">save</a> (<a class="el" href="namespaceshark.html#af4f8eb8e9618f5236b71bbcb12b8a524">OutArchive</a> &amp;archive, unsigned int version) const</td></tr>
<tr class="memdesc:a5bf66fa8db15cc529bec98976a2f5255 inherit pub_methods_classshark_1_1_i_serializable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Versioned storing of components, calls write(...).  <br /></td></tr>
<tr class="separator:a5bf66fa8db15cc529bec98976a2f5255 inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4560a94e8f4908fe8627e41e7d965735 inherit pub_methods_classshark_1_1_i_serializable" id="r_a4560a94e8f4908fe8627e41e7d965735"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_serializable.html#a4560a94e8f4908fe8627e41e7d965735">BOOST_SERIALIZATION_SPLIT_MEMBER</a> ()</td></tr>
<tr class="separator:a4560a94e8f4908fe8627e41e7d965735 inherit pub_methods_classshark_1_1_i_serializable"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classshark_1_1_i_parameterizable"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classshark_1_1_i_parameterizable')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classshark_1_1_i_parameterizable.html">shark::IParameterizable&lt; VectorType &gt;</a></td></tr>
<tr class="memitem:a9e3a11172e74d1aa7292f3de4e2b6ebc inherit pub_methods_classshark_1_1_i_parameterizable" id="r_a9e3a11172e74d1aa7292f3de4e2b6ebc"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_i_parameterizable.html#a9e3a11172e74d1aa7292f3de4e2b6ebc">~IParameterizable</a> ()</td></tr>
<tr class="separator:a9e3a11172e74d1aa7292f3de4e2b6ebc inherit pub_methods_classshark_1_1_i_parameterizable"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-attribs" name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:ada7a1e197b8d2721ac531c68988dfd17" id="r_ada7a1e197b8d2721ac531c68988dfd17"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a606dc86cf240c1fe43791df0ce24998e">KernelType</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#ada7a1e197b8d2721ac531c68988dfd17">m_kernel</a></td></tr>
<tr class="memdesc:ada7a1e197b8d2721ac531c68988dfd17"><td class="mdescLeft">&#160;</td><td class="mdescRight">pointer to kernel function  <br /></td></tr>
<tr class="separator:ada7a1e197b8d2721ac531c68988dfd17"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada9d9dbb9f3abd4cbf09c53e0bb92fd6" id="r_ada9d9dbb9f3abd4cbf09c53e0bb92fd6"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#afcfe228a0df389b8f56733d0e9ec90dc">LossType</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#ada9d9dbb9f3abd4cbf09c53e0bb92fd6">m_loss</a></td></tr>
<tr class="memdesc:ada9d9dbb9f3abd4cbf09c53e0bb92fd6"><td class="mdescLeft">&#160;</td><td class="mdescRight">pointer to loss function  <br /></td></tr>
<tr class="separator:ada9d9dbb9f3abd4cbf09c53e0bb92fd6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a374547615c259b8b19ca846fac2a9753" id="r_a374547615c259b8b19ca846fac2a9753"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a374547615c259b8b19ca846fac2a9753">m_C</a></td></tr>
<tr class="memdesc:a374547615c259b8b19ca846fac2a9753"><td class="mdescLeft">&#160;</td><td class="mdescRight">regularization parameter  <br /></td></tr>
<tr class="separator:a374547615c259b8b19ca846fac2a9753"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2222af2e7de2a6c68b18678f0fff1cff" id="r_a2222af2e7de2a6c68b18678f0fff1cff"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a2222af2e7de2a6c68b18678f0fff1cff">m_offset</a></td></tr>
<tr class="memdesc:a2222af2e7de2a6c68b18678f0fff1cff"><td class="mdescLeft">&#160;</td><td class="mdescRight">should the resulting model have an offset term?  <br /></td></tr>
<tr class="separator:a2222af2e7de2a6c68b18678f0fff1cff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc37f18ac6b0d7bf0a526f960ad4c4b6" id="r_acc37f18ac6b0d7bf0a526f960ad4c4b6"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#acc37f18ac6b0d7bf0a526f960ad4c4b6">m_unconstrained</a></td></tr>
<tr class="memdesc:acc37f18ac6b0d7bf0a526f960ad4c4b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">should C be stored as log(C) as a parameter?  <br /></td></tr>
<tr class="separator:acc37f18ac6b0d7bf0a526f960ad4c4b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0230c6c90039fd6dbc20dd5192c69c8b" id="r_a0230c6c90039fd6dbc20dd5192c69c8b"><td class="memItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a0230c6c90039fd6dbc20dd5192c69c8b">m_epochs</a></td></tr>
<tr class="memdesc:a0230c6c90039fd6dbc20dd5192c69c8b"><td class="mdescLeft">&#160;</td><td class="mdescRight">number of training epochs (sweeps over the data), or 0 for default = max(10, C)  <br /></td></tr>
<tr class="separator:a0230c6c90039fd6dbc20dd5192c69c8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3266b159eb84e746be2d35ff719c26bd" id="r_a3266b159eb84e746be2d35ff719c26bd"><td class="memItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a3266b159eb84e746be2d35ff719c26bd">m_cacheSize</a></td></tr>
<tr class="separator:a3266b159eb84e746be2d35ff719c26bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><div class="compoundTemplParams">template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, class CacheType = float&gt;<br />
class shark::KernelSGDTrainer&lt; InputType, CacheType &gt;</div><p>Generic stochastic gradient descent training for kernel-based models. </p>
<p>Given a differentiable loss function L(f, y) for classification this trainer solves the regularized risk minimization problem  </p><p class="formulaDsp">
\[
    \min \frac{1}{2} \sum_j \|w_j\|^2 + C \sum_i L(y_i, f(x_i)),
\]
</p>
<p> where i runs over training data, j over classes, and C &gt; 0 is the regularization parameter.</p>
<dl class="section user"><dt></dt><dd>This implementation is an adaptation of the PEGASOS algorithm, see the paper <em>Shalev-Shwartz et al. "Pegasos: Primal estimated sub-gradient solver for SVM." Mathematical Programming 127.1 (2011): 3-30.</em><br  />
<br  />
 However, the (non-essential) projection step is dropped, and the algorithm is applied to a kernelized model. The resulting optimization scheme amounts to plain standard stochastic gradient descent (SGD) with update steps of the form  <p class="formulaDsp">
\[
    w_j \leftarrow (1 - 1/t) w_j + \frac{C}{t} \frac{\partial L(y_i, f(x_i))}{\partial w_j}
\]
</p>
 for random index i. The only notable trick borrowed from that paper is the representation of the weight vectors in the form  <p class="formulaDsp">
\[
    w_j = s \cdot \sum_i \alpha_{i,j} k(x_i, \cdot)
\]
</p>
 with a scalar factor s (called alphaScale in the code). This enables scaling with factor (1 - 1/t) in constant time.</dd></dl>
<dl class="section user"><dt></dt><dd>NOTE: Being an SGD-based solver, this algorithm is relatively fast for differentiable loss functions such as the logistic loss (class <a class="el" href="classshark_1_1_cross_entropy.html" title="Error measure for classification tasks that can be used as the objective function for training.">CrossEntropy</a>). It suffers from significantly slower convergence for non-differentiable losses, e.g., the hinge loss for SVM training. </dd></dl>

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00090">90</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="a5488cda990c715d893dfba057fa88b40" name="a5488cda990c715d893dfba057fa88b40"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5488cda990c715d893dfba057fa88b40">&#9670;&#160;</a></span>ClassifierType</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="structshark_1_1_kernel_classifier.html">KernelClassifier</a>&lt;<a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>&gt; <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::ClassifierType</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00095">95</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

</div>
</div>
<a id="a74cd4fda9509abea240aa92b0475cd19" name="a74cd4fda9509abea240aa92b0475cd19"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a74cd4fda9509abea240aa92b0475cd19">&#9670;&#160;</a></span>ConstBatchInputReference</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="structshark_1_1_const_proxy_reference.html">ConstProxyReference</a>&lt;typenameBatch&lt;<a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>&gt;::typeconst&gt;::type <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::ConstBatchInputReference</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00098">98</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

</div>
</div>
<a id="a65ceba570e60a98afd4669f648332674" name="a65ceba570e60a98afd4669f648332674"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a65ceba570e60a98afd4669f648332674">&#9670;&#160;</a></span>KernelMatrixType</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="classshark_1_1_kernel_matrix.html">KernelMatrix</a>&lt;<a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a6097a25678eae9b9152d2b906157dea8">QpFloatType</a>&gt; <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::KernelMatrixType</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00101">101</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

</div>
</div>
<a id="a606dc86cf240c1fe43791df0ce24998e" name="a606dc86cf240c1fe43791df0ce24998e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a606dc86cf240c1fe43791df0ce24998e">&#9670;&#160;</a></span>KernelType</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="classshark_1_1_abstract_kernel_function.html">AbstractKernelFunction</a>&lt;<a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>&gt; <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::KernelType</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00094">94</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

</div>
</div>
<a id="afcfe228a0df389b8f56733d0e9ec90dc" name="afcfe228a0df389b8f56733d0e9ec90dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afcfe228a0df389b8f56733d0e9ec90dc">&#9670;&#160;</a></span>LossType</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="classshark_1_1_abstract_loss.html">AbstractLoss</a>&lt;unsigned int, RealVector&gt; <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::LossType</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00097">97</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

</div>
</div>
<a id="a438d0be0a607dac285103e8a264705ae" name="a438d0be0a607dac285103e8a264705ae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a438d0be0a607dac285103e8a264705ae">&#9670;&#160;</a></span>ModelType</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="classshark_1_1_kernel_expansion.html">KernelExpansion</a>&lt;<a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>&gt; <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::ModelType</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00096">96</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

</div>
</div>
<a id="adf916f6e4f7e0593ba14ef630f9a449d" name="adf916f6e4f7e0593ba14ef630f9a449d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adf916f6e4f7e0593ba14ef630f9a449d">&#9670;&#160;</a></span>PartlyPrecomputedMatrixType</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="classshark_1_1_partly_precomputed_matrix.html">PartlyPrecomputedMatrix</a>&lt; <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a65ceba570e60a98afd4669f648332674">KernelMatrixType</a> &gt; <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::PartlyPrecomputedMatrixType</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00102">102</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

</div>
</div>
<a id="a6097a25678eae9b9152d2b906157dea8" name="a6097a25678eae9b9152d2b906157dea8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6097a25678eae9b9152d2b906157dea8">&#9670;&#160;</a></span>QpFloatType</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef CacheType <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::QpFloatType</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00099">99</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="adc23910b5eddd9a8190fe796ff9291f4" name="adc23910b5eddd9a8190fe796ff9291f4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adc23910b5eddd9a8190fe796ff9291f4">&#9670;&#160;</a></span>KernelSGDTrainer()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::KernelSGDTrainer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a606dc86cf240c1fe43791df0ce24998e">KernelType</a> *&#160;</td>
          <td class="paramname"><em>kernel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#afcfe228a0df389b8f56733d0e9ec90dc">LossType</a> *&#160;</td>
          <td class="paramname"><em>loss</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>C</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>unconstrained</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>cacheSize</em> = <code>0x4000000</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">kernel</td><td>kernel function to use for training and prediction </td></tr>
    <tr><td class="paramname">loss</td><td>(sub-)differentiable loss function </td></tr>
    <tr><td class="paramname">C</td><td>regularization parameter - always the 'true' value of C, even when unconstrained is set </td></tr>
    <tr><td class="paramname">offset</td><td>whether to train with offset/bias parameter or not </td></tr>
    <tr><td class="paramname">unconstrained</td><td>when a C-value is given via setParameter, should it be piped through the exp-function before using it in the solver? </td></tr>
    <tr><td class="paramname">cacheSize</td><td>size of the cache </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00113">113</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a442f481e2e8f97156994ed478ec5d91f" name="a442f481e2e8f97156994ed478ec5d91f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a442f481e2e8f97156994ed478ec5d91f">&#9670;&#160;</a></span>C()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::C </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>return the value of the regularization parameter </p>

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00224">224</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a374547615c259b8b19ca846fac2a9753">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::m_C</a>.</p>

</div>
</div>
<a id="ac0183963a7f82e77ba7333666e05f895" name="ac0183963a7f82e77ba7333666e05f895"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac0183963a7f82e77ba7333666e05f895">&#9670;&#160;</a></span>cacheSize()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::cacheSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>return current cachesize </p>

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00125">125</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a3266b159eb84e746be2d35ff719c26bd">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::m_cacheSize</a>.</p>

</div>
</div>
<a id="ae7b9d884f5389bad153a8d9780cd494f" name="ae7b9d884f5389bad153a8d9780cd494f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae7b9d884f5389bad153a8d9780cd494f">&#9670;&#160;</a></span>epochs()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::size_t <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::epochs </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Return the number of training epochs. A value of 0 indicates that the default of max(10, C) should be used. </p>

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00199">199</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a0230c6c90039fd6dbc20dd5192c69c8b">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::m_epochs</a>.</p>

</div>
</div>
<a id="a5f52c070bb985c7bf1f7063c7b4c695a" name="a5f52c070bb985c7bf1f7063c7b4c695a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5f52c070bb985c7bf1f7063c7b4c695a">&#9670;&#160;</a></span>isUnconstrained()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::isUnconstrained </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>check whether the parameter C is represented as log(C), thus, in a form suitable for unconstrained optimization, in the parameter vector </p>

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00220">220</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#acc37f18ac6b0d7bf0a526f960ad4c4b6">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::m_unconstrained</a>.</p>

</div>
</div>
<a id="ade8ab81af9b2934ae72b442b8c98e9d5" name="ade8ab81af9b2934ae72b442b8c98e9d5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ade8ab81af9b2934ae72b442b8c98e9d5">&#9670;&#160;</a></span>kernel() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a606dc86cf240c1fe43791df0ce24998e">KernelType</a> * <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::kernel </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>get the kernel function </p>

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00208">208</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#ada7a1e197b8d2721ac531c68988dfd17">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::m_kernel</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#ac9b2d2d0ca5dc5bdf44194d1cbffe607">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::setKernel()</a>.</p>

</div>
</div>
<a id="ae8547043f53fd4f9a0fabbc0b30633e6" name="ae8547043f53fd4f9a0fabbc0b30633e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae8547043f53fd4f9a0fabbc0b30633e6">&#9670;&#160;</a></span>kernel() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a606dc86cf240c1fe43791df0ce24998e">KernelType</a> * <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::kernel </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>get the kernel function </p>

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00211">211</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#ada7a1e197b8d2721ac531c68988dfd17">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::m_kernel</a>.</p>

</div>
</div>
<a id="a5adb31bcd362569c1e123a6325329be9" name="a5adb31bcd362569c1e123a6325329be9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5adb31bcd362569c1e123a6325329be9">&#9670;&#160;</a></span>name()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::name </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>From <a class="el" href="classshark_1_1_i_nameable.html" title="This class is an interface for all objects which can have a name.">INameable</a>: return the class name. </p>

<p>Reimplemented from <a class="el" href="classshark_1_1_i_nameable.html#a9893f99314de30cd472e649c235d0db4">shark::INameable</a>.</p>

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00137">137</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

</div>
</div>
<a id="a9acfcaf7fee65d405706e35c16d43bb0" name="a9acfcaf7fee65d405706e35c16d43bb0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9acfcaf7fee65d405706e35c16d43bb0">&#9670;&#160;</a></span>numberOfParameters()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">size_t <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::numberOfParameters </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the number of hyper-parameters. </p>

<p>Reimplemented from <a class="el" href="classshark_1_1_i_parameterizable.html#aed1e8d1d4dbde387e2f6a25141ed3a20">shark::IParameterizable&lt; VectorType &gt;</a>.</p>

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00254">254</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#ada7a1e197b8d2721ac531c68988dfd17">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::m_kernel</a>, and <a class="el" href="classshark_1_1_i_parameterizable.html#aed1e8d1d4dbde387e2f6a25141ed3a20">shark::IParameterizable&lt; VectorType &gt;::numberOfParameters()</a>.</p>

</div>
</div>
<a id="ab9e4920082ba0a7a88a9589d82024326" name="ab9e4920082ba0a7a88a9589d82024326"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab9e4920082ba0a7a88a9589d82024326">&#9670;&#160;</a></span>parameterVector()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">RealVector <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::parameterVector </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the vector of hyper-parameters. </p>

<p>Reimplemented from <a class="el" href="classshark_1_1_i_parameterizable.html#afaa2ba692ab64a0edbff60d7ee6794db">shark::IParameterizable&lt; VectorType &gt;</a>.</p>

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00239">239</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a374547615c259b8b19ca846fac2a9753">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::m_C</a>, <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#ada7a1e197b8d2721ac531c68988dfd17">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::m_kernel</a>, <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#acc37f18ac6b0d7bf0a526f960ad4c4b6">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::m_unconstrained</a>, and <a class="el" href="classshark_1_1_i_parameterizable.html#afaa2ba692ab64a0edbff60d7ee6794db">shark::IParameterizable&lt; VectorType &gt;::parameterVector()</a>.</p>

</div>
</div>
<a id="a7b5805e9aedbf6a043c19aa802255837" name="a7b5805e9aedbf6a043c19aa802255837"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7b5805e9aedbf6a043c19aa802255837">&#9670;&#160;</a></span>setC()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::setC </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>set the value of the regularization parameter (must be positive) </p>

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00228">228</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a374547615c259b8b19ca846fac2a9753">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::m_C</a>, and <a class="el" href="_exception_8h.html#abd848215f138fc44f696aecb3e417e6c">RANGE_CHECK</a>.</p>

</div>
</div>
<a id="ab17a0f3738e21dc766e74cfd6e8e05ff" name="ab17a0f3738e21dc766e74cfd6e8e05ff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab17a0f3738e21dc766e74cfd6e8e05ff">&#9670;&#160;</a></span>setCacheSize()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::setCacheSize </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>size</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00131">131</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a3266b159eb84e746be2d35ff719c26bd">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::m_cacheSize</a>.</p>

</div>
</div>
<a id="acc7519d465974fcbb2c059debcedcc8e" name="acc7519d465974fcbb2c059debcedcc8e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acc7519d465974fcbb2c059debcedcc8e">&#9670;&#160;</a></span>setEpochs()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::setEpochs </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Set the number of training epochs. A value of 0 indicates that the default of max(10, C) should be used. </p>

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00204">204</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a0230c6c90039fd6dbc20dd5192c69c8b">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::m_epochs</a>.</p>

</div>
</div>
<a id="ac9b2d2d0ca5dc5bdf44194d1cbffe607" name="ac9b2d2d0ca5dc5bdf44194d1cbffe607"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac9b2d2d0ca5dc5bdf44194d1cbffe607">&#9670;&#160;</a></span>setKernel()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::setKernel </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a606dc86cf240c1fe43791df0ce24998e">KernelType</a> *&#160;</td>
          <td class="paramname"><em>kernel</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>set the kernel function </p>

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00214">214</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#ade8ab81af9b2934ae72b442b8c98e9d5">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::kernel()</a>, and <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#ada7a1e197b8d2721ac531c68988dfd17">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::m_kernel</a>.</p>

</div>
</div>
<a id="a60e89b698e5ff7d10ad7c613e369f0ac" name="a60e89b698e5ff7d10ad7c613e369f0ac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a60e89b698e5ff7d10ad7c613e369f0ac">&#9670;&#160;</a></span>setParameterVector()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::setParameterVector </td>
          <td>(</td>
          <td class="paramtype">RealVector const &amp;&#160;</td>
          <td class="paramname"><em>newParameters</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets the vector of hyper-parameters. </p>

<p>Reimplemented from <a class="el" href="classshark_1_1_i_parameterizable.html#ad5e35d1a10ff36fa72ea787baa40e9ad">shark::IParameterizable&lt; VectorType &gt;</a>.</p>

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00245">245</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a374547615c259b8b19ca846fac2a9753">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::m_C</a>, <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#ada7a1e197b8d2721ac531c68988dfd17">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::m_kernel</a>, <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#acc37f18ac6b0d7bf0a526f960ad4c4b6">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::m_unconstrained</a>, <a class="el" href="classshark_1_1_i_parameterizable.html#aed1e8d1d4dbde387e2f6a25141ed3a20">shark::IParameterizable&lt; VectorType &gt;::numberOfParameters()</a>, <a class="el" href="classshark_1_1_i_parameterizable.html#ad5e35d1a10ff36fa72ea787baa40e9ad">shark::IParameterizable&lt; VectorType &gt;::setParameterVector()</a>, and <a class="el" href="_exception_8h.html#a73abb5049a0168d72a48e72dda41708b">SHARK_ASSERT</a>.</p>

</div>
</div>
<a id="a31c7513f29d280ad3165d18100962391" name="a31c7513f29d280ad3165d18100962391"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a31c7513f29d280ad3165d18100962391">&#9670;&#160;</a></span>train()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::train </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a5488cda990c715d893dfba057fa88b40">ClassifierType</a> &amp;&#160;</td>
          <td class="paramname"><em>classifier</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, unsigned int &gt; &amp;&#160;</td>
          <td class="paramname"><em>dataset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00140">140</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_kernel_expansion.html#a3c65dfd17f38eaa461f6400d302fae48">shark::KernelExpansion&lt; InputType &gt;::alpha()</a>, <a class="el" href="namespaceshark.html#a5478d144c4c997faf5c246dd8e2f85b8">shark::createBatch()</a>, <a class="el" href="classshark_1_1_classifier.html#adf58b2ed9969bad9828772dd23c59c02">shark::Classifier&lt; Model &gt;::decisionFunction()</a>, <a class="el" href="namespaceshark_1_1random.html#aa64d4174eaf7111b03e0504eaa56b666">shark::random::discrete()</a>, <a class="el" href="group__shark__globals.html#gad9b0233e3adc882ed94f418f80767b09">shark::Data&lt; Type &gt;::elements()</a>, <a class="el" href="classshark_1_1_abstract_loss.html#a71706ed4c40d1635db1c372ecf5c8686">shark::AbstractLoss&lt; LabelT, OutputT &gt;::evalDerivative()</a>, <a class="el" href="namespaceshark_1_1random.html#ab5c1547eee483974d008d43f621a2234">shark::random::globalRng</a>, <a class="el" href="group__shark__globals.html#ga6f74e657c7e0c8a32b2456fb328bd653">shark::LabeledData&lt; InputT, LabelT &gt;::inputs()</a>, <a class="el" href="group__shark__globals.html#ga6328a5aa2570c01a5ac5f25076071663">shark::LabeledData&lt; InputT, LabelT &gt;::labels()</a>, <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a374547615c259b8b19ca846fac2a9753">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::m_C</a>, <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a3266b159eb84e746be2d35ff719c26bd">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::m_cacheSize</a>, <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a0230c6c90039fd6dbc20dd5192c69c8b">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::m_epochs</a>, <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#ada7a1e197b8d2721ac531c68988dfd17">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::m_kernel</a>, <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#ada9d9dbb9f3abd4cbf09c53e0bb92fd6">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::m_loss</a>, <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a2222af2e7de2a6c68b18678f0fff1cff">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::m_offset</a>, <a class="el" href="group__shark__globals.html#ga1fee3b5830ae11a78109e8c0265c6569">shark::numberOfClasses()</a>, <a class="el" href="group__shark__globals.html#ga5333445992cd6b14392cd80a1ab5403c">shark::LabeledData&lt; InputT, LabelT &gt;::numberOfElements()</a>, <a class="el" href="classshark_1_1_kernel_expansion.html#a1c89cb50933ee211d67af90e6366e0ee">shark::KernelExpansion&lt; InputType &gt;::offset()</a>, <a class="el" href="classshark_1_1_partly_precomputed_matrix.html#aed8139929435c448eac748cf119ef275">shark::PartlyPrecomputedMatrix&lt; Matrix &gt;::row()</a>, and <a class="el" href="classshark_1_1_kernel_expansion.html#a38c97766f52bf00e5b0120c46c15f37f">shark::KernelExpansion&lt; InputType &gt;::setStructure()</a>.</p>

<p class="reference">Referenced by <a class="el" href="_kernel_logistic_regression_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main()</a>.</p>

</div>
</div>
<a id="a09fa50917fb4f3deda0e6b0c29977d07" name="a09fa50917fb4f3deda0e6b0c29977d07"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a09fa50917fb4f3deda0e6b0c29977d07">&#9670;&#160;</a></span>trainOffset()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::trainOffset </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>check whether the model to be trained should include an offset term </p>

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00235">235</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a2222af2e7de2a6c68b18678f0fff1cff">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::m_offset</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a374547615c259b8b19ca846fac2a9753" name="a374547615c259b8b19ca846fac2a9753"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a374547615c259b8b19ca846fac2a9753">&#9670;&#160;</a></span>m_C</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::m_C</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>regularization parameter </p>

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00261">261</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a442f481e2e8f97156994ed478ec5d91f">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::C()</a>, <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#ab9e4920082ba0a7a88a9589d82024326">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::parameterVector()</a>, <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a7b5805e9aedbf6a043c19aa802255837">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::setC()</a>, <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a60e89b698e5ff7d10ad7c613e369f0ac">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::setParameterVector()</a>, and <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a31c7513f29d280ad3165d18100962391">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::train()</a>.</p>

</div>
</div>
<a id="a3266b159eb84e746be2d35ff719c26bd" name="a3266b159eb84e746be2d35ff719c26bd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3266b159eb84e746be2d35ff719c26bd">&#9670;&#160;</a></span>m_cacheSize</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::size_t <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::m_cacheSize</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00267">267</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#ac0183963a7f82e77ba7333666e05f895">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::cacheSize()</a>, <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#ab17a0f3738e21dc766e74cfd6e8e05ff">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::setCacheSize()</a>, and <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a31c7513f29d280ad3165d18100962391">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::train()</a>.</p>

</div>
</div>
<a id="a0230c6c90039fd6dbc20dd5192c69c8b" name="a0230c6c90039fd6dbc20dd5192c69c8b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0230c6c90039fd6dbc20dd5192c69c8b">&#9670;&#160;</a></span>m_epochs</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::size_t <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::m_epochs</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>number of training epochs (sweeps over the data), or 0 for default = max(10, C) </p>

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00264">264</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#ae7b9d884f5389bad153a8d9780cd494f">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::epochs()</a>, <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#acc7519d465974fcbb2c059debcedcc8e">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::setEpochs()</a>, and <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a31c7513f29d280ad3165d18100962391">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::train()</a>.</p>

</div>
</div>
<a id="ada7a1e197b8d2721ac531c68988dfd17" name="ada7a1e197b8d2721ac531c68988dfd17"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ada7a1e197b8d2721ac531c68988dfd17">&#9670;&#160;</a></span>m_kernel</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a606dc86cf240c1fe43791df0ce24998e">KernelType</a>* <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::m_kernel</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>pointer to kernel function </p>

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00259">259</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#ade8ab81af9b2934ae72b442b8c98e9d5">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::kernel()</a>, <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#ae8547043f53fd4f9a0fabbc0b30633e6">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::kernel()</a>, <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a9acfcaf7fee65d405706e35c16d43bb0">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::numberOfParameters()</a>, <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#ab9e4920082ba0a7a88a9589d82024326">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::parameterVector()</a>, <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#ac9b2d2d0ca5dc5bdf44194d1cbffe607">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::setKernel()</a>, <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a60e89b698e5ff7d10ad7c613e369f0ac">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::setParameterVector()</a>, and <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a31c7513f29d280ad3165d18100962391">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::train()</a>.</p>

</div>
</div>
<a id="ada9d9dbb9f3abd4cbf09c53e0bb92fd6" name="ada9d9dbb9f3abd4cbf09c53e0bb92fd6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ada9d9dbb9f3abd4cbf09c53e0bb92fd6">&#9670;&#160;</a></span>m_loss</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#afcfe228a0df389b8f56733d0e9ec90dc">LossType</a>* <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::m_loss</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>pointer to loss function </p>

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00260">260</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a31c7513f29d280ad3165d18100962391">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::train()</a>.</p>

</div>
</div>
<a id="a2222af2e7de2a6c68b18678f0fff1cff" name="a2222af2e7de2a6c68b18678f0fff1cff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2222af2e7de2a6c68b18678f0fff1cff">&#9670;&#160;</a></span>m_offset</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::m_offset</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>should the resulting model have an offset term? </p>

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00262">262</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a31c7513f29d280ad3165d18100962391">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::train()</a>, and <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a09fa50917fb4f3deda0e6b0c29977d07">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::trainOffset()</a>.</p>

</div>
</div>
<a id="acc37f18ac6b0d7bf0a526f960ad4c4b6" name="acc37f18ac6b0d7bf0a526f960ad4c4b6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acc37f18ac6b0d7bf0a526f960ad4c4b6">&#9670;&#160;</a></span>m_unconstrained</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a> , class CacheType  = float&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html">shark::KernelSGDTrainer</a>&lt; <a class="el" href="classshark_1_1_abstract_trainer.html#a0cfa7cdd27b8bb162e64188095f8fa71">InputType</a>, CacheType &gt;::m_unconstrained</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>should C be stored as log(C) as a parameter? </p>

<p class="definition">Definition at line <a class="el" href="_kernel_s_g_d_trainer_8h_source.html#l00263">263</a> of file <a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a5f52c070bb985c7bf1f7063c7b4c695a">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::isUnconstrained()</a>, <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#ab9e4920082ba0a7a88a9589d82024326">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::parameterVector()</a>, and <a class="el" href="classshark_1_1_kernel_s_g_d_trainer.html#a60e89b698e5ff7d10ad7c613e369f0ac">shark::KernelSGDTrainer&lt; InputType, CacheType &gt;::setParameterVector()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/shark/Algorithms/Trainers/<a class="el" href="_kernel_s_g_d_trainer_8h_source.html">KernelSGDTrainer.h</a></li>
</ul>
</div><!-- contents -->
</div>
</body>
</html>
